package application;

import base.Bulletin;
import base.Manager;
import base.Person;
import javafx.event.EventHandler;
import javafx.scene.control.TableCell;
import javafx.scene.control.TableColumn;
import javafx.scene.control.cell.TextFieldTableCell;
import javafx.scene.input.MouseEvent;
import javafx.util.Callback;

public class TaskCellFactory implements Callback<TableColumn<Bulletin, String>, TableCell<Bulletin, String>> {

	@Override
	public TableCell<Bulletin, String> call(TableColumn<Bulletin, String> param) {
		Person p = new Manager();
		TextFieldTableCell<Bulletin, String> cell = new TextFieldTableCell<>();
		//TextFieldTableCell<Task, String> cell = new TextFieldTableCell<>();
        cell.setOnMouseClicked(new EventHandler<MouseEvent>(){  
            @Override  
            public void handle(MouseEvent event) {  
                //System.out.println(cell.getText()); 
            	NamelistController.toworkchart(cell.getText());
            	
                  
            }  
        });
        //cell.setContextMenu(taskContextMenu);
        return cell;
	}
}
